<?php
declare(strict_types=1);

namespace longbingcore\wxcore;

use app\ApiRest;
use think\App;
use think\facade\Db;

class PayNotify  {

   // static protected $uniacid;

//    public function __construct(App $app)
//    {
//        $this->app = $app;
//
//    }


    /**
     * @author chenniang
     * @DataTime: 2022-08-19 13:29
     * @功能说明:支付宝回调信息
     */
    public function aliNotify($arr){

        switch ($arr['subject']){

            case '余额充值':
                //余额卡
                $order_model = new \app\farm\model\BalanceOrder();

                break;

            case '认养商品':
                //认养
                $order_model = new \app\farm\model\ClaimOrder();

                break;
            case '土地商品':
                //土地
                $order_model = new \app\farm\model\LandOrder();

                break;

            case '配送订单':
                //配送订单
                $order_model = new \app\farm\model\SendOrder();

                break;

            case '养殖商品':
                //养殖订单
                $order_model = new \app\farm\model\BreedOrder();

                break;
            case '商场商品':
                //商城订单
                $order_model = new \app\farm\model\ShopOrder();

                break;
        }

        $order_model->orderResult($arr['out_trade_no'],$arr['trade_no']);

        return true;
    }



}